$hc-offcanvas-nav-container-width: 280px;
$background: #243949;
$white: #fffce1;
$yellow: #dab977;

@import './hc-offcanvas-nav';
@import './mixins';

@mixin mi {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  text-indent: 0;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'liga';
  display: inline-block;
  width: 19px;
  height: 19px;
  margin-right: 15px;
  font-size: 19px;
  vertical-align: top;
}

html, body, div, span, header, ul, li, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

html {
  height: 100%;
}

body {
  font-family: 'Raleway', sans-serif;
  text-align: center;
  color: $white;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
}

em {
  font-style: italic;
}

strong {
  font-weight: 600;
}

ol, ul {
  list-style: none;
}

.cf {
  &::before,
  &::after {
    content: '';
    display: block;
    height: 0;
    overflow: hidden;
  }

  &::after {
    clear: both;
  }
}

#container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  height: 100%;
  background: linear-gradient(-134deg, #517FA4 0%, $background 100%);
}

.wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

#main-nav {
  display: none;
}

header {
  position: relative;
  padding: 50px 0 20px;

  h1 {
    font-size: 50px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 5px;
    padding-bottom: 8px;
  }

  h2 {
    max-width: 680px;
    margin: auto;
    font-size: 20px;
    font-weight: 200;
    line-height: 1.4;
    text-align: center;
    letter-spacing: 1px;
    padding-bottom: 30px;
  }

  .git {
    display: inline-block;
    text-decoration: none;
    color: #fff;
    border-radius: 4px;
    padding: 4px 10px 4px 0;
    font-size: 15px;
    font-weight: 400;
    color: $white;
    background: #54b9cb;
    transition: background .15s ease-in-out;

    &:hover {
      background: #4CA8B9;

      svg {
        border-color: #54b9cb;
      }
    }

    svg {
      width: 15px;
      height: 15px;
      fill: $white;
      position: relative;
      top: 2px;
      padding: 0 10px;
      margin-right: 10px;
      border-right: 1px solid #4daabb;
      transition: border-color .15s ease-in-out;
    }
  }

  .ver {
    padding-top: 15px;
    font-weight: 200;
    color: $yellow;

    span {
      color: $white;
    }
  }

  .toggle {
    @include hc-hamburger('default', 35px, 24px, 4px, darken($background, 7%), .25s);
    position: relative;
    width: auto;
    top: auto;
    left: auto;
    float: left;
    display: block;
    cursor: pointer;
    box-sizing: content-box;
    font-size: 20px;
    padding-left: 55px;
    line-height: 24px;
    margin-top: 55px;

    &:hover {
      span {
        &,
        &::before,
        &::after {
          background: $yellow;
        }
      }
    }

    div {
      display: inline-block;
      margin-right: 15px;
    }
  }

}

footer {
  padding-bottom: 40px;

  .swm {
    display: inline-block;
    padding: 0 15px;

    svg {
      display: block;
      width: auto;
      height: 17px;
      margin-top: 22px;

      path {
        transition: fill .1s ease;
      }

      .l-1 {
        fill: #4fb5e1;
      }
      .l-2 {
        fill: #f2c053;
      }
      .l-3 {
        fill: #a7ce38;
      }
    }

    &:not(:hover) {
      svg {
        .l-1 {
          fill: lighten($background, 20%);
        }
        .l-2 {
          fill: lighten($background, 50%);
        }
        .l-3 {
          fill: lighten($background, 30%);
        }
      }
    }
  }
}

main {
  flex: 1 0 auto;
  padding-bottom: 30px;
  text-align: left;

  .content {
    border-top: 1px solid rgba(255, 255, 255, .1);
  }

  h4 {
    font-size: 15px;
    letter-spacing: 1px;
    font-weight: 600;
    text-transform: uppercase;
    margin: 20px 0;

    &:first-child {
      margin-top: 30px;
    }
  }

  .actions {
    margin: 0 -15px;
    text-align: center;

    &.checkboxes {
      text-align: left;
      padding-top: 8px;

      label {
        font-size: 14px;
        text-transform: uppercase;
        cursor: pointer;

        input {
          display: none;

          &:checked {

            & ~ span {
              background: $yellow;

              &::before {
                content: '';
                position: absolute;
                top: 50%;
                left: 50%;
                margin-top: -1px;
                border: solid $background;
                border-width: 0 3px 3px 0;
                display: inline-block;
                padding: 5px 2px;
                transform: translate(-50%, -50%) rotate(45deg);
              }
            }
          }
        }

        span {
          display: inline-block;
          position: relative;
          top: -1px;
          width: 22px;
          height: 22px;
          background: $white;
          margin-right: 12px;
          vertical-align: top;
          transition: all .1s ease;
        }
      }
    }

    div {
      padding: 0 15px 20px;
      box-sizing: border-box;
    }

    @media screen and (min-width: 800px) {
      display: flex;
      flex-wrap: wrap;

      div {
        float: left;
        flex: 1 1 33.33%;
        max-width: 33.33%;
      }

      &.position {
        div {
          float: left;
          flex: 1 1 25%;
          max-width: 25%;
        }
      }
    }
  }

  .button {
    position: relative;
    display: block;
    padding: 18px 30px 16px;
    text-transform: uppercase;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 1px;
    text-decoration: none;
    color: $background;
    cursor: pointer;
    background: $white;
    border-radius: 30px/80px;
    transition: all .1s ease;

    &:not(.active):hover {
      color: darken($yellow, 5%);
    }

    &.active {
      background: $yellow;
    }
  }
}

.hc-offcanvas-nav {

  .nav-wrapper-0 > .nav-content {
    padding-bottom: 41px;
  }

  h2 {
    font-weight: 400;
  }

  a {
    font-size: 16px;
  }

  li {

    &.search {
      .nav-item {
        padding-top: 0;
      }

      input[type="text"] {
        width: 100%;
        box-sizing: border-box;
        border: none;
        border-radius: 3px;
        font-size: 14px;
        color: #fff;
        background: rgba(#fff, .12);
        padding: 5px 10px;
        box-shadow: none;
        outline: none;

        &::placeholder {
          color: rgba(#fff, .8);
        }
      }
    }

    &.add > a::before {
      @include mi;
      content: 'add';
    }

    &.new > .nav-item::before {
      @include mi;
      content: 'fiber_new';
    }

    &.cryptocurrency > .nav-item::before {
      @include mi;
      content: 'local_atm';
    }

    &.devices > .nav-item::before {
      @include mi;
      content: 'devices';
    }

    &.mobile > .nav-item::before {
      @include mi;
      content: 'phone_android';
    }

    &.television > .nav-item::before {
      @include mi;
      content: 'desktop_windows';
    }

    &.camera > .nav-item::before {
      @include mi;
      content: 'camera_alt';
    }

    &.magazines > .nav-item::before {
      @include mi;
      content: 'import_contacts';
    }

    &.store > .nav-item::before {
      @include mi;
      content: 'store';
    }

    &.collections > .nav-item::before {
      @include mi;
      content: 'collections';
    }

    &.credits > .nav-item::before {
      @include mi;
      content: 'credit_card';
    }
  }

  ul.bottom-nav {
    position: absolute;
    z-index: 10;
    bottom: 0;
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    border-top: 1px solid darken($hc-offcanvas-nav-background-color, 6%);

    li {
      flex: auto;

      a {
        padding: 10px;
        text-align: center;
        height: 100%;
        border-bottom: none;
      }

      svg {
        fill: #fff;
        display: inline-block;
        vertical-align: middle;
      }

      &.github {
        svg {
          width: 17px;
          height: 17px;
        }
      }

      &.ko-fi {
        svg {
          width: 21px;
          height: 21px;
        }
      }

      &.email {
        svg {
          width: 19px;
          height: 19px;
        }
      }
    }
  }
}